#include "timer.h"
#include "time.h"

void timer::start()
{
	begtime = clock();
}

unsigned long timer::elapsedtime()
{
	return((unsigned long)clock() - begtime)/CLOCKS_PER_SEC;
}

bool timer::timeout(unsigned long seconds)
{
	return elapsedtime()>=seconds;
}
